package com.itany.cloud.service.impl;

import com.itany.cloud.entity.Emp;
import com.itany.cloud.mapper.EmpMapper;
import com.itany.cloud.service.EmpService;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 石小俊
 */
@Service
public class EmpServiceImpl implements EmpService {

    @Autowired(required = false)
    private EmpMapper empMapper;

    @Override
    public void addEmp(Emp emp) {
//        int i = 1 / 0;
        empMapper.insert(emp);
    }
}
